import React, { Component } from 'react'
import { View } from '@tarojs/components'
import BottomNavBar from '../../components/BottomNavBar'
import Box from '../../components/Box'

import './index.scss'

export default class Index extends Component {

  /*componentWillMount () { }

  componentDidMount () { }

  componentWillUnmount () { }

  componentDidShow () { }

  componentDidHide () { }*/

  state = {
    current: 0
  }

  setCurrent (current) {
    this.setState({ current })
  }

  render () {
    return (
      <View className='base-box'>
        <Box current={this.state.current} />
        <BottomNavBar setCurrent={(current) => this.setCurrent(current)} />
      </View>
    )
  }
}
